package com.changli01.file.exer2;

import java.io.File;

public class Exer2 {
     public static void main(String[] args) {
         File file = new File("C:\\Users\\钰玟\\Pictures\\头像");
         String [] s = file.list();
         for (String s1:s){
             if(s1.endsWith(".jpg")){
                 System.out.println(s1);
             }
         }
     }
}
